import request from '@/utils/request'

// 学生列表
export function fetchStudentList(listQuery) {
  return request({
    url: '/student/list',
    method: 'get',
    params: {
      page:listQuery.page,
      limit:listQuery.limit,
      sno:listQuery.sno,
      name:listQuery.name,
      id_number:listQuery.id_number,
      admission_number:listQuery.admission_number,
      points:listQuery.points
    }
  })
}

// 具体学生信息
export function fetchStudentById(id) {
  return request({
    url: `/student/${id}`,
    method: 'get',
  })
}


// 创建学生
export function createStudent(temp) {
  return request({
    url: '/student/upload',
    method: 'post',
    data:temp
  })
}

// 更新学生信息
export function updateStudent(temp) {
  return request({
    url: '/student/update',
    method: 'post',
    data:temp
  })
}
